
<!--分页查询共用的页面-->
<%@ include file="/common/paginateUtil.jsp"%>

<%@ include file="/common/dateUtil.jsp"%>
  <%@ page language="java" pageEncoding="UTF-8"%>

	<style>
        select {
			width:80px;
	    }
		input [type="text"]
		{
			width:150px;
		}
	</style>
</head>

		<script type="text/javascript" charset="utf-8">
		
			
			function getEndTimeColumn(value, rowData, rowIndex)
			{
				var endTime = rowData.endTime;
				var status = rowData.status;
				if(status == 'New')
				   return '<span style="color:red;font-weight:bold;">报警中..</span>';
				return endTime;
			}
			//编辑列
			function getEditActionColumn(value, rowData, rowIndex)
			{
				 var entityId = rowData.id;
				 var sVal = rowData.processed; //处理标志位
				 if(sVal != '未处理')
					 return sVal;
				  var html =  "<a href=\"javascript:InfoWindow.viewAlarm('" + entityId+ "');\">" +" 未处理</a>";
				 return html;

			}

            var attachmentPath = "<%=ApplicationPath%>/adasAttachment/";
            function getDownloadActionColumn(alue, rowData, rowIndex)
            {
                var resourceId = rowData.id;
                var filePath = rowData.filePath;
                if(!filePath)
                    filePath = "";
                filePath = filePath.replace("\\","/");
				var status = rowData.status;
                var fileName = rowData.fileName;
                var html = status;
                if(status == "new")
                    html = "等待上传";
                else if(status == "uploading")
                    html = "正在上传";
                else if(status == "failed")
                {
                    html = "上传失败";
                }
                else if(status == "uploaded" || status == "上传完成")
                {
                    filePath = attachmentPath + filePath;
                    var downloadPath = "<%=ApplicationPath%>/adasAlarm/download.action?adasAttachmentId="+ resourceId;
                    html =  "<a href=\"javascript:InfoWindow.viewAdasAlarmAttachment('" + resourceId+ "');\">" +" 查看</a>";
                    html += "&nbsp;&nbsp;&nbsp;&nbsp;";
                    //html += "<a href=" + downloadPath+ "'\"> 另存为</a>";
                    html +=  "<a href=\"javascript:window.open('" + downloadPath+ "');\">下载 </a>";
                    //if(fileName.indexOf(".mp4") > 0)
					{

					}
                }
                return html;
            }



			$(document).ready(function() {


                Utility.loadGridWithParams();
				  


			} );

		</script>
<body>

				<table id="queryGrid" class="easyui-datagrid" title="" style="width:100%;height:480px"
						data-options="singleSelect:true,rownumbers:true,striped:true,fitColumns: true,checkOnSelect: false, selectOnCheck: false,
						fit:true,
						url:'<%=ApplicationPath%>/adasAttachment/${filePath}',method:'get'">
					<thead>
							<tr>
								<th data-options="field:'sn'"  width="5%">序号</th>
								<th data-options="field:'alarmState'"  width="8%">报警标志</th>
								<th data-options="field:'status'"  width="8%">状态</th>
								<th data-options="field:'latitude'"  width="8%">纬度</th>
								<th data-options="field:'longitude'"  width="8%">经度</th>
								<th data-options="field:'altitude'"  width="8%">卫星高程</th>
								<th data-options="field:'velocity'"  width="8%">卫星速度</th>
								<th data-options="field:'direction'"  width="8%">卫星方向</th>
								<th data-options="field:'gpsTime'"  width="16%">时间</th>
								<th data-options="field:'xSpeed'"  width="8%">X 轴加速度</th>
								<th data-options="field:'ySpeed'"  width="8%">Y 轴加速度</th>
								<th data-options="field:'zSpeed'"  width="8%">Z 轴加速度</th>
								<th data-options="field:'xAngularSpeed'"  width="8%">X 轴角速度</th>
								<th data-options="field:'yAngularSpeed'"  width="8%">Y 轴角速度</th>
								<th data-options="field:'zAngularSpeed'"  width="8%">Z 轴角速度</th>


								<th data-options="field:'impulseSpeed'"  width="8%">脉冲速度</th>
								<th data-options="field:'obdSpeed'"  width="8%">OBD速度</th>
								<th data-options="field:'gearState'"  width="8%">档位状态</th>

								<th data-options="field:'accleratePedalTravelValue'"  width="8%">加速踏板行程值</th>
								<th data-options="field:'brakePedalTravelValue'"  width="8%">制动踏板行程值</th>
								<th data-options="field:'brakeState'"  width="8%">制动状态</th>

								<th data-options="field:'engineSpeed'"  width="8%">发送机转速</th>
								<th data-options="field:'wheelAngle'"  width="8%">方向盘角度</th>
								<th data-options="field:'turnSignal'"  width="8%">转向灯状态</th>


						</tr>
					</thead>				
				</table>
</body>

